CREATE TABLE [dbo].[tb_LiquidacionReal]
(
[idLiquidacionReal] [int] NOT NULL IDENTITY(1, 1),
[Liquidacion] [int] NOT NULL,
[Agente] [int] NOT NULL,
[Organizacion] [int] NULL,
[Servicio] [int] NULL,
[LegajoSalarial] [int] NOT NULL,
[CargoSalarial] [int] NULL,
[SituacionRevista] [int] NULL,
[Horas] [int] NULL,
[Desde] [datetime] NULL,
[Hasta] [datetime] NULL,
[Dias] [datetime] NULL,
[Concepto] [int] NOT NULL,
[Cantidad] [int] NULL,
[Afiliacion] [int] NULL,
[Descripcion] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[MontoHaberes] [float] NOT NULL,
[MontoDescuento] [float] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[tb_LiquidacionReal] ADD CONSTRAINT [PK_tb_LiquidacionReal] PRIMARY KEY NONCLUSTERED  ([idLiquidacionReal]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[tb_LiquidacionReal] WITH NOCHECK ADD CONSTRAINT [FK_tb_LiquidacionReal_tb_Afiliaciones] FOREIGN KEY ([Afiliacion]) REFERENCES [dbo].[tb_Afiliaciones] ([idAfiliacion])
GO
ALTER TABLE [dbo].[tb_LiquidacionReal] WITH NOCHECK ADD CONSTRAINT [FK_tb_LiquidacionReal_tb_Agentes] FOREIGN KEY ([Agente]) REFERENCES [dbo].[tb_Agentes] ([idAgente])
GO
ALTER TABLE [dbo].[tb_LiquidacionReal] WITH NOCHECK ADD CONSTRAINT [FK_tb_LiquidacionReal_tb_ConceptosDeLiquidacion] FOREIGN KEY ([Concepto]) REFERENCES [dbo].[tb_ConceptosDeLiquidacion] ([idConceptoLiquidacion])
GO
ALTER TABLE [dbo].[tb_LiquidacionReal] WITH NOCHECK ADD CONSTRAINT [FK_tb_LiquidacionReal_tb_Liquidaciones] FOREIGN KEY ([Liquidacion]) REFERENCES [dbo].[tb_Liquidaciones] ([idLiquidacion])
GO
ALTER TABLE [dbo].[tb_LiquidacionReal] WITH NOCHECK ADD CONSTRAINT [FK_tb_LiquidacionReal_tb_Organizaciones] FOREIGN KEY ([Organizacion]) REFERENCES [dbo].[tb_Organizaciones] ([idOrganizaciones])
GO
